Total Complexity | 3 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | |||
4 | export default class Heroku { |
||
5 | constructor(name, apiKey, logger) { |
||
6 | this.api = new Api(name, apiKey); |
||
7 | this.logger = logger; |
||
8 | } |
||
9 | |||
10 | async deploy(file, version) { |
||
11 | const source = await this.api.createSource(); |
||
12 | |||
13 | await this.api.upload(source.put, file); |
||
14 | const build = await this.api.createBuild(source.get, version); |
||
15 | |||
16 | return build.id; |
||
17 | } |
||
18 | |||
19 | test() { |
||
20 | return this.api.test(); |
||
21 | } |
||
22 | } |
||
23 |